package day8;


public class Pet {
    protected String name;
    private double weight;
//    private String vari;
//    private String food;
    private int strength;
    public Pet(){
    }

    public Pet(String name, double weight, int strength) {
        this.name = name;
        this.weight =weight;
//        this.vari = vari;
        this.strength=strength;

    }

    public int getStrength() {
        return strength;
    }

    public void setStrength(int strength) {
        this.strength = strength;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

//    public String getVari() {
//        return vari;
//    }
//    public void setVari(String vari) {
//        this.vari = vari;
//    }

    public void introduct(){
        System.out.println("这只宠物名字叫"+getName());
        System.out.println("体重是"+getWeight()+"Kg.体力是"+getStrength());
    }
    public void eat(){
        System.out.println(getName()+"饿了，在吃东西！");
    }
    public void slepp(){
        System.out.println(getName()+"困了，在睡觉！");
    }
//    public String tostring(){
//        return "这只宠物名字叫"+getName()+"体重是"+getWeight()+"Kg.品种是"+getVari();
//    }

}
